// app.js
App({
	onLaunch() {
		this.onInitPlatformInfo();
	},
	// 初始化请求设备信息
	onInitPlatformInfo() {
		wx.getSystemInfo({
			success: (res) => {
				this.globalData.safeArea = res.safeArea;
				this.globalData.wxVersion = res.version;
				this.globalData.platform = res.platform;
				this.globalData.iPhoneX = res.model.indexOf("iPhone X") > -1 || res.model.indexOf("iPhone 1") > -1;
			}
		})
	},
	globalData: {
		iPhoneX: false, // 是否iphoneX
		wxVersion: '1.0.0', // 微信版本号
		platform: "devtools", // 运行设备
		safeArea:{},
	}
})
